home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.dtc.hp.com!hplntx!hplabs!hplextra!hplb!hppwd!news
- From: Martin Wink <martin@hpopd.pwd.hp.com>
- Subject: iostream and multibyte data
- Sender: news@hpopd.pwd.hp.com (C-News owner c/o Richi)
- Message-ID: <315880D9.3E01@hpopd.pwd.hp.com>
- Date: Tue, 26 Mar 1996 23:42:17 GMT
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- Nntp-Posting-Host: hppwdk83.pwd.hp.com
- Mime-Version: 1.0
- X-Mailer: Mozilla 2.0 (WinNT; I)
- Organization: Hewlett-Packard EMO Pinewood, UK
-
- Can anyone suggest pointers to information on how to use the
- standard iostream classes with Multibyte data, such as
- Shift-JIS?
-
- I use MSVC & MFC, so I've tried searching on MSDN, but without
- success.
-
- The issue as I see it is that the iostream only ever deals with
- single byte characters, and so at a higher level there needs to
- be code which detects whether a lead byte has been read, and to
- deal with the next byte accordingly.
-
- My gut feeling is that it should be possible to sub-class the
- iostream classes to do centralize the extra work, but would love
- to hear that it's been successfully done before before trying to
- reinvent it myself.
-
- From the fact that the source code deals with 'char' types, I
- guess a similar but slightly simpler issue exists for Unicode as
- well, but it surprises me that I haven't heard the problem
- raised before.
-
- regards..............................
- Martin Wink, HP-EMO, Pinewood, UK.
-